import React, { Component } from "react";
import memoryUtils from "../../utils/memoryUtils.js"
import { Redirect } from "react-router-dom"

import { Layout } from 'antd';

const { Header, Footer, Sider, Content } = Layout;
export default class Admin extends Component {

    render() {
        const { username } = memoryUtils.userInfo

        if (!username) {
            return <Redirect to="/login" />
        }
        return (
            <Layout>
                <Sider>Sider</Sider>
                <Layout>
                    <Header>Header</Header>
                    <Content>Content</Content>
                    <Footer>Footer</Footer>
                </Layout>
            </Layout>
        )
    }
}